/*
Copyright (c) 2010 Vadim Seregin
Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/

#ifndef PREFERENCES_H
#define PREFERENCES_H

#include "../../res/preferencesdialog.h"
#include "baselist.h"

class Preferences : public PreferencesDialog
{
	
public:
	Preferences( wxString& homeDir, long lWords, long lIncrement, long lTime, long lCardNum );
	~Preferences();
	
	// get maximum words to learn
	long GetMaxWordNum(){ return m_lWords; }
	
	// get score increment
	long GetScoreIncrement(){ return m_lIncrement; }
	
	// get break time
	long GetSleepPeriod(){ return m_lTime; }
	
	// get number of cards
	long GetCardNum(){ return m_checkBox1->GetValue(); }
	
protected:
	// change audio file, name is filename without extension
	void ChangeAudio( wxString& name );
	
	// get settings
	virtual void OnOkClick( wxCommandEvent& event );
	
	// copy audio fiel for correct answer
	virtual void OnCorrectClick( wxCommandEvent& event );
	
	// play audio file for correct answer
	virtual void OnPlayCorrect( wxCommandEvent& event );
	
	// copy audio fiel for incorrect answer
	virtual void OnIncorrectClick( wxCommandEvent& event );
	
	// play audio file for incorrect answer
	virtual void OnPlayIncorrect( wxCommandEvent& event );
	
	// key down
	virtual void OnKeyDown( wxKeyEvent& event );
	
protected:
	wxString m_sTutorDir;         // tanotutor home directory
	
	long m_lWords;
	long m_lIncrement;
	long m_lTime;
};

#endif // PREFERENCES_H